package com.globagames.strategicgames.business
{
	import com.globagames.strategicgames.model.Session;
	import com.globagames.strategicgames.model.StrategicGameModelLocator;
	
	import mx.messaging.Producer;
	import mx.messaging.events.MessageAckEvent;
	import mx.messaging.events.MessageFaultEvent;
	import mx.messaging.messages.AsyncMessage;
	
	public class ConnectProducerAll extends Producer
	{
		
		private var model:StrategicGameModelLocator = StrategicGameModelLocator.getInstance();
	
	
		public function ConnectProducerAll()
		{
			destination = "connectMessages";
			subtopic = "all";						
			addEventListener(MessageFaultEvent.FAULT, faultHandler);
		}
		public function acknowledgeHandler(event:MessageAckEvent) :void
		{
			trace("acknowledgeHandler");
		}
		public function faultHandler(event:MessageFaultEvent)
		{
			trace("faultHandler");
		}
		public function sendMessageConnected(s:Session):void {
			var message:AsyncMessage = new AsyncMessage();
			message.body = s;
			send(message);
		}

	}
}